//  This file is part of Swordbible - http://www.swordwarrior.net
//  Copyright (C) 2003-2009 Manu Mital mital.manu@gmail.com

//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2, or (at your option)
//  any later version.

//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.

//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software Foundation,
//  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


// SwordBibleDoc.h : interface of the CSwordBibleDoc class
//


#pragma once

const int nBibles = 40; 
const int nBottom = 30;
const int nBottomLeft = 20;
const int nDevotional = 10;
const int nGenBooks = 25;
const int MAXBOOKMARKS = 75;
const int bmmi = 8; // 0 based position of bookmark menu item
const int MAXHISTORY = 20;
const int MAX_BIBLE_PLACES = 117;
const int MAX_BIBLE_PEOPLE = 101;


class CSwordBibleDoc : public CDocument
{
protected: // create from serialization only
	CSwordBibleDoc();
	DECLARE_DYNCREATE(CSwordBibleDoc)

// Attributes
public:

// Operations
public:

// Overrides
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);

  static CString driveLetter;

	static CString bookCode[66][4];  // names of books of bible and abbreviations
	static int VerseCount[66][151];  // total number of verses in each chapter of the bible

	static sword::SWModule* pRTFBibleModule[nBibles];    //holds all bibles, RTF version
	static sword::SWModule* pHTMLBibleModule[nBibles];   //holds all bibles, HTML version
	static int numBiblesAvailable;

	static BOOL devotion_startup;
	static BOOL lemma_tags;
	static BOOL morph_tags;
	static BOOL fn_tags;
	static BOOL crossref_tags;
	static sword::SWModule * pXrefModuleActive;
  static BOOL heading_tags;
	static BOOL redchrist_tags;
	static BOOL bibleZoom;
  //static BOOL bibleRTL;
  static BOOL scripRefZoom;
	static BOOL dailybibleZoom;
	static BOOL bibleSplit;
	static BOOL rememberLastVerse;  // jump to the last active verse in previous session

	
	static int Book();							// the current book, not a 0 based based index
	static int Chapter();						// the active chapter
	static int Verse();							// the active verse
	static sword::VerseKey key;
	static CHARFORMAT curTextfont;			// the font of the bible text in rich edit control
	static CHARFORMAT curVersefont;		 // the font of the bible verse in the rich edit control

	static CStringArray VerseHistory;   // used by quickverse combo box
            


	static int curNotesChapter ;				// the active chapter in the notes section
	static CString curNotesBook;				// the active book in the notes section
	static BOOL notesSynch;						// synchronize notes with main bible position?
	static BOOL notesBold;
	static BOOL notesItalic;
	static BOOL notesUnderline;
	static BOOL notesParaRight;
	static BOOL notesParaCenter;
	static BOOL notesParaLeft;


	static BOOL bottomZoom;
	static BOOL bottomSynch;						// synchronize bottom with main bible position?
	static int bottomChapter();                     // bottom (commentary) chapter number
	static int bottomVerse();
	static int bottomBook();                        // bottom (commentary) book, not a zero-based number
	static sword::VerseKey curBottomKey ;
	static sword::SWModule* pRTFComModule[nBottom];  //holds all commentaries, RTF format
	static int numComAvailable;
	
	static BOOL GenBookZoom;
	static int numGenBooksAvailable;
	static sword::SWModule * pRTFGenBooks[nGenBooks];
	static sword::TreeKeyIdx * GenBookTree;
	static sword::SWKey GenBookKey;
	


	static BOOL devZoom;
	static int numDictAvailable;
	static sword::SWModule* pRTFDictModule[nBottomLeft];  //holds all dictionary modules, RTF version
  static sword::SWModule * pDictModuleActive;           // the dictionary used for word lookups
	

	static BOOL dictZoom;
	static sword::SWKey devotionKey;
	static CString monthNames[12];
	static int numDevAvailable;
	static sword::SWModule* pRTFDevModule[nDevotional];

	static CString oneyearKey;


	static BOOL showTitle;

  static TCHAR alphabet[26];
  static CString BiblePlaces[MAX_BIBLE_PLACES];
  static CString BiblePeople[MAX_BIBLE_PEOPLE];

	
// Implementation
public:
	virtual ~CSwordBibleDoc();




#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:

	
};


